/****************************************************************************
 * Copyright (C) 2012 Maxim Integrated Products, All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY,  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL MAXIM INTEGRATED PRODUCTS BE LIABLE FOR ANY CLAIM, DAMAGES
 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Except as contained in this notice, the name of Maxim Integrated Products
 * shall not be used except as stated in the Maxim Integrated Products
 * Branding Policy.
 *
 * The mere transfer of this software does not imply any licenses
 * of trade secrets, proprietary technology, copyrights, patents,
 * trademarks, maskwork rights, or any other form of intellectual
 * property whatsoever. Maxim Integrated Products retains all ownership rights.
 *
 *     Description: MAXQ622 Configurations
 *             $Id: maxq_config.h 3410 2012-03-11 21:45:30Z jbrodt $
 *
 ********************************************************************************
 */

/** 
* \file
* \brief    MAXQ622 driver configuration file
* \details  This file contains definitions to configure the MAXQ driver library
*           for the MAXQ622. The values contained in this file should be
*           adjusted to meet the needs of the application. 
* \details  This file includes target specific and compiler specific files.
*/

#ifndef _MAXQ_CONFIG_H
#define _MAXQ_CONFIG_H

// Target/compiler include files
#ifdef __IAR_SYSTEMS_ICC__
#include <intrinsics.h>
#include <iomaxq622.h>
#endif

#ifdef __CROSSWORKS
#include <inmaxq.h>
#include <maxq622.h>
#endif

#include "arch\maxq_types.h"

/// External crystal/resonator frequency
#define XTAL_FREQ               12000000L // frequency in Hz

/// Default internal system clock frequency
#define DEFAULT_SYS_CLK_FREQ    XTAL_FREQ  // frequency in Hz
#define SYS_CLK                 DEFAULT_SYS_CLK_FREQ

/// Typical Internal Nanopower Ring Frequency in Hz
#define TYPICAL_NANOPWR_FREQ    8000   // frequency in Hz

//***** SPI Driver *****
/// Number of SPI macros on the microcontroller
#define NUM_SPI           2

//***** Comm Driver *****
/// Baud rate in bps
#define COMM_BAUD   115200
/// Received characters are echoed
#define COMM_ECHO           
#ifdef  __IAR_SYSTEMS_ICC__
#define COMM_USE_MAXQ_LIB_PRINTF
#endif

//***** I2C Driver *****
#define USE_SW_I2C

// Target/compiler specific NOP syntax
#ifdef  __IAR_SYSTEMS_ICC__
#define NOP()   __asm("nop")
#endif
#ifdef __CROSSWORKS
#define NOP()   __no_operation()
#endif

#endif      // _MAXQ_CONFIG_H
